package com.example.administrator.myapplication.set.PersonalCenter;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;

import com.example.administrator.myapplication.HomeActivity;
import com.example.administrator.myapplication.R;

/**
 * Created by Administrator on 2018/1/16.
 */

public class PersonalCenterunTestFragment extends Fragment{
    private Toolbar toolbar;
    private ImageView custom_headIcon;
    private Button bt_untest;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view =inflater.inflate(R.layout.fragment_personalcenter_untest,container,false);
        custom_headIcon = (ImageView) view.findViewById(R.id.custom_headicon);
        bt_untest= (Button) view.findViewById(R.id.bt_personalcenter_untest);

        bt_untest.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =new Intent(getActivity(), HomeActivity.class);
                startActivity(intent);
            }
        });
        custom_headIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =new Intent(getActivity(),PersonalHeadIconActivity.class);
                startActivity(intent);
            }
        });

        toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar_personcenter);
        toolbar.setNavigationIcon(R.mipmap.custom_back);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().finish();
            }
        });
        return view;
    }

}
